package com.neuedu.fruitshop.web.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neuedu.fruitshop.entity.Fruit;
import com.neuedu.fruitshop.entity.Pager;
import com.neuedu.fruitshop.web.mapper.IndexShowMapper;
import com.neuedu.fruitshop.web.service.IndexShowService;

/**
 * 前台首页显示水果信息
 * @author wsl
 *
 */
@Service
public class IndexShowServiceImpl implements IndexShowService {
	
	@Autowired
	private IndexShowMapper indexShowMapper;

	/**
	 * 推荐商品板块--根据最新时间查询
	 * @param oldtime
	 * @return
	 */
	@Override
	public List<Fruit> findNewest() {
		// TODO Auto-generated method stub
		return indexShowMapper.findNewest();
	}

	/**
	 * 促销商品板块--根据价格查询
	 * @return
	 */
	@Override
	public List<Fruit> findPromotion() {
		// TODO Auto-generated method stub
		return indexShowMapper.findPromotion();
	}

	/**
	 * 当季水果板块--根据水果类型查询
	 * @return
	 */
	@Override
	public List<Fruit> findByType(Integer typeId) {
		// TODO Auto-generated method stub
		return indexShowMapper.findByType(typeId);
	}

	
	
	
	


}
